import http from "@/utils/other/fetch";

export function login(params) {
  return http.post("/Sale/Login", params);
}

export function logout() {
  return http.get("/Sale/LoginOut");
}
// 注册
export function addUser(params) {
  return http.post("/Sale/SaleApply/addUser", params);
}

// // 获取用户菜单权限
// export function getAuthRule() {
//   return http.post("/Sale/Auth/getAuthRule");
// }

// 获取验证码
export function sendMobileCode(mobile) {
  return http.post("/Sale/Login/sendCode", { mobile }, true);
}

// 编辑密码
export function editPwd(params) {
  return http.post("/Sale/Auth/editPwd", params);
}

// 忘记密码
export function forgetPwd(params) {
  return http.post("/Sale/Login/forgetPwd", params);
}

// 异步路由
export function getAuthRule() {
  return http.post("/Sale/Auth/getAuthRule");
}
